{echo:JS::import('dialog?skin=brief');}
{echo:JS::import('dialogtools');}
{echo:JS::import('form');}
<form action="" method="post">
<div class="tools_bar clearfix">
    <a class="icon-delicious" href="{url:/customer/fan_list}"> 全部记录</a>
    <span class="fr"><a href='javascript:;' id="condition" class="icon-search" style="" > 筛选条件</a><input id="condition_input" type="hidden" name="condition" value="{$condition}"></span>
</div>
<table class="default" >
    <tr>
        <th>用户</th>
        <th>所属订单</th>
        <th>现金券</th>
        <th>线上现金券</th>
        <th>线下现金券</th>
        <th>返现时间</th>
          
    </tr>
    {query:name=fan_list as bl fields=bl.*,us.name join=left join user as us on bl.user_id eq us.id where= $where order= bl.id desc id=$obj page=1 desc }
        <tr class="{if:$key%2==1}odd{/if}">
        <td>{$item['name']}
        	{if:$item['is_seller']==1}
        	&nbsp;<b style="color:red;">商</b>
        	{else:}
        	&nbsp;<b style="color:green;">消</b>
        	{/if}
        </td>
        <td>{$item['order_no']}</td>
        <td>{$item['xjq']}</td>
        <td>{$item['up_line_xjq']}</td>
        <td>{$item['down_line_xjq']}</td>
        <td>{$item['fan_time']}</td>
        
    {/query}
</table>
</form>
<div class="page_nav">
{echo:$obj->pageBar()}
</div>
<script type="text/javascript">
    var form =  new Form();
    $("#condition").on("click",function(){
        $("body").Condition({input:"#condition_input",okVal:'高级搜索',callback:function(data){tools_submit({action:'{url:/customer/fan_list}',method:'get'});},data:{'fan_time':{name:'返现时间'},'name':{name:'用户名'},'xjq':{name:'现金券'},'up_line_xjq':{name:'线上现金券'},'down_line_xjq':{name:'线下现金券'},'order_no':{name:'所属订单编号'}
        }});
    });
</script>
